package ar.com.ctrln.view.sistema.login.component;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.select.SelectorComposer;
import org.zkoss.zk.ui.select.annotation.Listen;
import org.zkoss.zk.ui.select.annotation.Wire;
import org.zkoss.zul.Button;
import org.zkoss.zul.Window;

public class WindowLogOutController extends SelectorComposer<Component> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6458975743207762377L;

	

	@Wire("#wSalir")
	Window wSalir;
	
	@Wire("#btnAceptar")
	Button btnAceptar;
	
	@Override
	public void doAfterCompose(Component comp) throws Exception {
		// TODO Auto-generated method stub
		super.doAfterCompose(comp);
	}
	
	@Listen("onClick = #btnAceptar")
	public void logout() {
		String logout = "/j_spring_security_logout";
		Executions.sendRedirect(logout);
	}
}
